package com.cci.kangdao.utilTool;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;


/**
 * 邮件工具类
 * @author Eric
 *
 */
public class PropertiesUtil {

	/**
	 * 数据初始化
	 */
	public static  String getProperties(String path ,String key) {
		Properties properties = new Properties();
		try {
			InputStream inputStream = PropertiesUtil.class.getClassLoader().getResourceAsStream(path);
			if(null != inputStream){
				properties.load(inputStream);
				inputStream.close();
				return properties.getProperty(key);
			}
			return null;
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return "";
		}
	}
}
